﻿using System;
using System.Linq;
using System.ServiceModel;

namespace BigMailer.Services
{
	[Serializable]
	public class AuthenticationException : Exception
	{
		public AuthenticationException() { }
		public AuthenticationException(string message) : base( message ) { }
		public AuthenticationException(string message, Exception inner) : base( message, inner ) { }
		protected AuthenticationException(
		  System.Runtime.Serialization.SerializationInfo info,
		  System.Runtime.Serialization.StreamingContext context)
			: base( info, context ) { }

		public static void ThrowFault(string msg)
		{
			throw new FaultException<AuthenticationException>(
				new AuthenticationException( msg ), msg );
		}
	}
}
